<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Sets the image iterations</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagick.setimageinterpolatemethod.html">Imagick::setImageInterpolateMethod</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagick.setimagematte.html">Imagick::setImageMatte</a></div>
 <div class="up"><a href="class.imagick.html">Imagick</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="imagick.setimageiterations" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::setImageIterations</h1>
  <p class="verinfo">(PECL imagick 2.0.0)</p><p class="refpurpose"><span class="refname">Imagick::setImageIterations</span> &mdash; <span class="dc-title">Sets the image iterations</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.setimageiterations-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>Imagick::setImageIterations</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$iterations</code></span>
   )</div>

  <p class="para rdfs-comment">
   Sets the number of iterations an animated image is repeated.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.setimageiterations-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">iterations</code></em></dt>

     <dd>

      <p class="para">
       The number of iterations the image should loop over. Set to &#039;0&#039; to loop
       continuously.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.setimageiterations-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-imagick.setimageiterations-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   错误时抛出 ImagickException。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-imagick.setimageiterations-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3247">
    <p><strong>Example #1 Basic <span class="function"><strong>Imagick::setImageIterations()</strong></span> usage</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$imagick&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Imagick</span><span style="color: #007700">(</span><span style="color: #0000BB">realpath</span><span style="color: #007700">(</span><span style="color: #DD0000">"Test.gif"</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">$imagick&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">coalesceImages</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setImageIterations</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$imagick&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">deconstructImages</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">writeImages</span><span style="color: #007700">(</span><span style="color: #DD0000">'/path/to/save/OnceOnly.gif'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagick.setimageinterpolatemethod.html">Imagick::setImageInterpolateMethod</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagick.setimagematte.html">Imagick::setImageMatte</a></div>
 <div class="up"><a href="class.imagick.html">Imagick</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
